package com.miku.blog.controller;

import com.miku.blog.annotation.SystemLog;
import com.miku.blog.domain.dto.UserInfoDTO;
import com.miku.blog.domain.pojo.ResponseResult;
import com.miku.blog.service.UserInfoService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

/**
 * @author shkstart
 * @create ${}YEAR-05-26 0:37
 */
@Api(tags = "用户信息更新")
@RestController
public class UserInfoController {

    @Autowired
    private UserInfoService userInfoService;

    @SystemLog(notes = "修改个人信息")
    @ApiOperation(value = "修改个人信息接口",notes = "根据此次操作的用户ID 更新其相关信息")
    @PutMapping("/users/info")
    public ResponseResult updateInfo(@RequestBody UserInfoDTO userInfoDTO){
        return userInfoService.updateInfo(userInfoDTO);
    }


}
